import re
import requests


def get_page(url):
    r = requests.get(url)
    html = r.text

    re_s = '<title>(.*)</title>'
    title_info = re.findall(re_s, html)
    print(title_info)
    title = title_info[0]
    print(title)

    re_s = '<ul class="list-group list-group-flush">(.*?)</ul>'
    menu_html_info = re.findall(re_s, html, re.DOTALL)
    print(menu_html_info)
    menu_html = menu_html_info[0]

    re_s = '<a href="(.*)" class="text-secondary">(.*)</a>'
    menu_info = re.findall(re_s, menu_html)

    return title, menu_info


if __name__ == '__main__':
    url = 'https://python-abc.xyz/basic/5995/'
    title, menu_info = get_page(url)
    print(title)
    for menu in menu_info:
        print(menu)
